Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

case

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

case

Extensible string utility for converting, identifying and flipping string case

  • 1.6.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is case?

The 'case' npm package provides utilities for converting strings between different case styles, such as camelCase, snake_case, and more. It is useful for formatting strings in a consistent manner across different parts of an application.

What are case's main functionalities?

camel

Converts a string to camelCase. This is useful for JavaScript variable naming conventions.

const case = require('case');
console.log(case.camel('hello world')); // 'helloWorld'

snake

Converts a string to snake_case. This is often used in Python variable naming conventions or for database column names.

const case = require('case');
console.log(case.snake('hello world')); // 'hello_world'

kebab

Converts a string to kebab-case. This is commonly used in URLs or CSS class names.

const case = require('case');
console.log(case.kebab('hello world')); // 'hello-world'

title

Converts a string to Title Case. This is useful for formatting titles or headings.

const case = require('case');
console.log(case.title('hello world')); // 'Hello World'

constant

Converts a string to CONSTANT_CASE. This is often used for constants in programming.

const case = require('case');
console.log(case.constant('hello world')); // 'HELLO_WORLD'

Other packages similar to case

Keywords

FAQs

Package last updated on 24 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc